home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / dattim.zip / DATETIM1.FRM (.txt) next >
Visual Basic Form  |  1991-11-04  |  10KB  |  201 lines

  1. FullWindow
  2. DateTime
  3. IIIII
  4. Form1
  5. Zeitmesser
  6. &Menu
  7.     MenuClick
  8. &Click
  9. Separator1
  10. MenuFormat
  11. dddd ddddd ttttt
  12. MenuFormat
  13. dddd ddddd hh:mm
  14. MenuFormat
  15. ddd ddddd hh:mm
  16. MenuFormat
  17. dddd d-mmmm-yy h:mm:ss
  18. MenuFormat
  19. ddd dd-mmm-yy hh:mm
  20. MenuFormat
  21. ddd d/m/yy h:mm
  22. MenuFormat
  23. Enter your own format
  24. Separator2
  25.     MenuAbout
  26.     &About...
  27. MenuHelp
  28. &Help
  29. INIFILENAME
  30. HelpFilePath
  31. DTFormat
  32. Form_Unload
  33.     Abbrechen
  34. WindowState]
  35. NORMALN
  36. WritePrivateProfileString!
  37. Left'
  38.     MenuClick
  39. Checked
  40. MenuFormat3
  41. Caption4
  42. Form_Paint
  43. DatTim
  44. CurrentXx
  45. Width
  46. SmallWindow
  47.     Form_Loadh
  48. Initializeb
  49. GetPrivateProfileInt
  50. GetPrivateProfileString
  51. Clear_MenuFormat_CheckmarksO
  52. TRUEB
  53. hModule
  54. GetClassWord
  55. GCW_HMODULE
  56. GetModuleFileName
  57. Zeitmesser
  58. Interval
  59. Form_Resize
  60.     MINIMIZEDn
  61. MenuAbout_Click
  62. MenuClick_Click
  63. MenuHelp_Click
  64. SH_NORMAL_FOCUS
  65. ErrNo
  66. MB_OK
  67. MB_ICONSTOP
  68. MenuFormat_ClickN
  69. Index%
  70. FALSE
  71. Zeitmesser_Timer]
  72. iZeitmesser;
  73. ActiveWindow
  74. SystemFocus
  75. GetActiveWindow
  76. SetFocusAPI
  77.     DatTimOld
  78.     GetWindow
  79. GW_OWNER
  80. Visible
  81. GW_HWNDFIRST
  82. Flags
  83. SWP_NOMOVE
  84. SWP_NOSIZE
  85. SWP_SHOWWINDOW
  86. SWP_NOACTIVATE
  87. SetWindowPos
  88. Separator1_ClickZ
  89.  Program related declarations
  90. DATETIME.INI
  91. Form_Unload
  92.  To make sure the parameters of the NORMAL window are saved,
  93.  not the ones of the icon in case the form is minimized:
  94.  Write all parameters into DATETIME.INI:
  95. DateTime
  96. DateTime
  97. DateTime
  98. Click"
  99. DateTime
  100. FormatString
  101. DateTime
  102. FormatNumber
  103.  Make sure the other form is unloaded also:
  104. Form_Paint
  105.  DatTim$ is a global variable containing the text to be displayed:
  106.  SmallWindow shall always follow FullWindow but is hiddeni
  107.  as long FullWindow is active:
  108. Form_Load
  109.  Get parameters from file (INIFILENAME$):o
  110. DateTime
  111. DateTime
  112. DateTime
  113. Click"
  114.  Remove trailing Chr$(0) and other stuff
  115.  Remove leading and trailing blanksr
  116. DateTime
  117. FormatString
  118. Enter your own format"
  119.  Remove trailing Chr$(0) and other stuff
  120.  Remove leading and trailing blanksr
  121. DateTime
  122. FormatNumber
  123.  Determine DTFormat$ and put check mark next to active format:
  124.  Determine own path to find help file later.
  125.  First get own path and file name:
  126.  Remove chr$(0) and other stuff
  127.  Remove extension and replace with .WRI:
  128.  Initialize display string:
  129. Initializing, one moment please...
  130.  Load start timer which runs for one second only, then forces:
  131.  WindowState from MINIMIZED to NORMAL to facilitate loadinge
  132.  from the WIN.INI load= line:o
  133. Form_Resize
  134.  Zeitmesser(1) timer when resized from icon to normal:
  135.  WindowState = MINIMIZED, i.e. an icon
  136.  If resized to icon then stop timer to reduce system load,
  137.  hide the small form and clear text so it does not display
  138.  over the icon: 
  139.  WindowState
  140.  Let the small form always follow the primary one:
  141. MenuAbout_Click
  142.   DateTime
  143.             Copyright 
  144.  1991
  145.     A.C.I. GmbH MicroSysteme
  146.           Hans-Georg Michna"
  147. 74776.2361@compuserve.com"
  148.       Select Help for more info.
  149. MenuClick_Click
  150. MenuHelp_Click
  151.  The help file path of DATETIME.WRI has been determined in Sub Form_Load
  152. WRITE.EXE 
  153. WRITE.EXE not found.
  154. Install Windows properly."
  155. Error"
  156. Initialize
  157.  Set general constants that cannot be declared:d
  158. MenuFormat_Click
  159.  Make sure that the window is repaintede
  160.  which may have been obscured by the unfolding menu:
  161.  Ask user for its own format string:
  162. Date and time codes:
  163. d..dddd"
  164. Month:
  165. m..mmmm"
  166. Year:"
  167. yy or yyyy
  168. Full date: ddddd
  169. Hour:"
  170. h or hh"
  171. Minute:"
  172. m or mm"
  173. Second: s or ss"
  174. Full time: ttttt
  175. Date delimiter: /"
  176. Example: d/m/yy h:mm
  177. Enter Your Own Format"
  178.  Now try if this string really works:
  179. Invalid format string:
  180. First format activated instead. Click on Help to get more information.
  181. Format String Error"
  182.  Common procedure for all menu items:
  183. Clear_MenuFormat_Checkmarks
  184. Zeitmesser_Timer
  185.  Start timer, runs only for a short time after loading:
  186.  Just loaded and a short time passed; time to resize
  187.  to NORMAL, but then put focus back to where it wase
  188.  (presumably Program Manager):
  189.  The start timer has fulfilled its purpose and will now be disabled for good:a
  190.  iZeitmesser% = 1, i.e. main seconds timer
  191.  For repaint purposes the string is kept in the global variable DatTim$ 
  192.  Check if got system focus:t
  193.  In case FullWindow was moved put SmallWindow behind again:a
  194.  Still have focus:
  195.  Focus was lost:
  196.  Replace FullWindow with SmallWindow:l
  197.  Not visible, i.e. borderless SmallWindow is visible
  198.  If necessary, bring to top:
  199.  Visible/Not Visible
  200. iZeitmesser% = 1
  201.